<%@ page language="java" import="java.sql.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" href="calendarview.css">
	<script src="js/prototype.js"></script>
    <%HttpSession sesja = request.getSession(true);
    if(sesja.getAttribute("lang").equals("en")){%><script src="js/calendarviewEN.js"></script>    
    <%}else{%><script src="js/calendarviewPL.js"></script><%}%>    
    <script>
      Event.observe(window, 'load', function() { setupCalendars()});
    </script>
</head>
<body>
<div class=kontakt>
<%
if(sesja.getAttribute("log")!=null && sesja.getAttribute("log").equals("klient")){
	String login = sesja.getAttribute("nick").toString();
	String imie=null;
	String nazwisko=null;
	String adres=null;
	String kod=null;
	String miasto=null;
	Class.forName("com.mysql.jdbc.Driver");
	Connection con = DriverManager.getConnection("jdbc:mysql://localhost/kurier","root","");
	Statement stmt = con.createStatement();
	ResultSet rs = stmt.executeQuery("SELECT k.imie,k.nazwisko,k.adres,k.kod,k.miasto FROM uzytkownicy u, klienci k WHERE u.login = '"+login+"' and u.id=k.id");
	while(rs.next()){
		  imie = rs.getString("imie");
		  nazwisko = rs.getString("nazwisko");
		  adres = rs.getString("adres");
		  kod = rs.getString("kod");
		  miasto = rs.getString("miasto");
		  }			  
	%>
	<div class=formularz>
	<fieldset class=obrys>
	<%if(sesja.getAttribute("lang").equals("en")){%>
	
		<%if(request.getParameter("pos")!=null && request.getParameter("pos").equals("1")){	
		if(request.getParameter("data")!=null){%>
			<%if(request.getParameter("data").equals("current")){%>
				<h3>Ordering a courier: STAGE 2/4</h3><br>
				<img src='images/kurier.png' width=20% height=20%>
				<h3>Personal Information:</h3><br>
				<table class=opcje >
					<tr>
						<td align="center" valign="middle"> 
							<table cellspacing='5px'>
							<tr>
								<td>Name:</td>
								<td><%out.println(request.getParameter("imie"));%></td>
							</tr>
							<tr>
								<td>Surname:</td>
								<td><%out.println(request.getParameter("nazwisko"));%></td>
							</tr>
							<tr>
								<td>Address:</td>
								<td><%out.println(request.getParameter("adres"));%></td>
							</tr>
							<tr>
								<td>Postal code:</td>
								<td><%out.println(request.getParameter("kod"));%></td>
							</tr>
							<tr>
								<td>City:</td>
								<td><%out.println(request.getParameter("miasto"));%></td>
							</tr>
							</table>
						</td>
					</tr>
				</table>
				<br>
				<hr>
				<h3>Date of arrival of the courier:</h3>	
				          <div id="embeddedCalendar" style="margin-left: auto; margin-right: auto"></div>
				          <br />
			<form id=rejestracja name=rejestracja method=post action=#>
			<table class=opcje >
				<tr>
					<td align="center" valign="middle"> 
						<table cellspacing='5px'>
							<tr>
								<td>Chosen date:</td>
								<td><input type='text' id='data_kuriera' size='27' name='data_kuriera' value='Select date' readonly/></td>
								<td id=td1></td>
							</tr>
							<tr>
								<td>Additional comments:</td>
								<td><textarea style="height:50px; width:25" name='uwagi' id='uwagi'></textarea></td>
								<td id=td2></td>
							</tr>								
						</table>
					</td>
				</tr>
			</table>				
					<input type='hidden' id='imie' size='20' name='imie' value='<%out.println(request.getParameter("imie"));%>' />
					<input type='hidden' id='nazwisko' size='20' name='nazwisko' value='<%out.println(request.getParameter("nazwisko"));%>' />
					<input type='hidden' id='adres' size='20' name='adres' value='<%out.println(request.getParameter("adres"));%>' />
					<input type='hidden' size='20' name='kod' id=kod value='<%out.println(request.getParameter("kod"));%>' />
					<input type='hidden' size='20' id='miasto' name='miasto' value='<%out.println(request.getParameter("miasto"));%>'/>
					<input class=przycisk type='button' id='ok' name='ok' value='Continue' onClick='Zamowkuriera2()'>
					<input class=przycisk type='button' name='clean' value='Cancel' onClick='javascript:window.location = "index.jsp";'>
					<input class=przycisk type='button' name='clean' value='Back' onClick='history.back();'>
			</form>
			<%}else if(request.getParameter("data").equals("new")){%>
				<h3>Ordering a courier: STAGE 2/4</h3><br>
				<img src='images/kurier.png' width=20% height=20%>
				<h3>Personal informations:</h3><br>
				<table class=opcje >
					<tr>
						<td align="center" valign="middle"> 
							<table cellspacing='5px'>
							<tr>
								<td>Name:</td>
								<td><%out.println(request.getParameter("imie2"));%></td>
							</tr>
							<tr>
								<td>Surname:</td>
								<td><%out.println(request.getParameter("nazwisko2"));%></td>
							</tr>
							<tr>
								<td>Address:</td>
								<td><%out.println(request.getParameter("adres2"));%></td>
							</tr>
							<tr>
								<td>Postal code:</td>
								<td><%out.println(request.getParameter("kod2"));%></td>
							</tr>
							<tr>
								<td>City:</td>
								<td><%out.println(request.getParameter("miasto2"));%></td>
							</tr>
							</table>
						</td>
					</tr>
				</table>
				<br>
				<hr>
				<h3>Date of arrival of the courier:</h3>	
				          <div id="embeddedCalendar" style="margin-left: auto; margin-right: auto">
				          </div>
				          <br />
			<form id=rejestracja name=rejestracja method=post action=#>
			<table class=opcje >
				<tr>
					<td align="center" valign="middle"> 
						<table cellspacing='5px'>
							<tr>
								<td>Chosen date:</td>
								<td><input type='text' id='data_kuriera' size='27' name='data_kuriera' value='Wybierz date' readonly/></td>
								<td id=td1></td>
							</tr>
							<tr>
								<td>Additional comments:</td>
								<td><textarea style="height:50px; width:25" name='uwagi' id='uwagi'></textarea></td>
								<td id=td2></td>
							</tr>								
						</table>
					</td>
				</tr>
			</table>
					<input type='hidden' id='imie' size='20' name='imie' value='<%out.println(request.getParameter("imie2"));%>' />
					<input type='hidden' id='nazwisko' size='20' name='nazwisko' value='<%out.println(request.getParameter("nazwisko2"));%>' />
					<input type='hidden' id='adres' size='20' name='adres' value='<%out.println(request.getParameter("adres2"));%>' />
					<input type='hidden' size='20' name='kod' id=kod value='<%out.println(request.getParameter("kod2"));%>' />
					<input type='hidden' size='20' id='miasto' name='miasto' value='<%out.println(request.getParameter("miasto2"));%>'/>
					<input class=przycisk type='button' id='ok' name='ok' value='Continue' onClick='Zamowkuriera2()'>
					<input class=przycisk type='button' name='clean' value='Cancel' onClick='javascript:window.location = "index.jsp";'>
					<input class=przycisk type='button' name='clean' value='Back' onClick='history.back();'>
			</form>
			<%}else{%>
				<br><img src="images/stop.png" width=30% height=30%><br><br>
				<h1>ACCESS DANIED</h1><br>
				You don't have permission to access this page.<br>
			<%} %>
		<%}else{%>	
				<br><img src="images/stop.png" width=30% height=30%><br><br>
				<h1>ACCESS DANIED</h1><br>
				You don't have permission to access this page.<br>	
	<%}}
	else if(request.getParameter("pos")!=null && request.getParameter("pos").equals("2")){		
		if(request.getParameter("data_kuriera")!=null){%>
			<h3>Ordering a couriera: STAGE 3/4</h3><br>
			<img src='images/kurier.png' width=20% height=20%>
					<h3>Personal informations:</h3><br>
					<table class=opcje >
						<tr>
							<td align="center" valign="middle"> 
								<table cellspacing='5px'>
								<tr>
									<td>Name:</td>
									<td><%out.println(request.getParameter("imie"));%></td>
								</tr>
								<tr>
									<td>Surname:</td>
									<td><%out.println(request.getParameter("nazwisko"));%></td>
								</tr>
								<tr>
									<td>Address:</td>
									<td><%out.println(request.getParameter("adres"));%></td>
								</tr>
								<tr>
									<td>Postal code:</td>
									<td><%out.println(request.getParameter("kod"));%></td>
								</tr>
								<tr>
									<td>City:</td>
									<td><%out.println(request.getParameter("miasto"));%></td>
								</tr>
								<tr>
									<td>Date of arrival of a courier:</td>
									<td><%out.println(request.getParameter("data_kuriera"));%></td>
								</tr>
								<tr>
									<td>Additional comments:</td>
									<td><%out.println(request.getParameter("uwagi"));%></td>
								</tr>
								</table>
							</td>
						</tr>
					</table>	
					<br/>
					<hr>
					<h3>Recipient data:</h3><br>
					<form id=rejestracja name=rejestracja method=post onSubmit='Ustawienia()' action=#>
						<table class=opcje >
						<tr>
							<td align="center" valign="middle"> 
								<table cellspacing='20px'>
								<tr>
									<td>Name:</td>
									<td><input type='text' id='imie2' size='20' name='imie2'/></td>
										<td id=td1></td>
								</tr>
								<tr>
									<td>Surname:</td>
									<td><input type='text' id='nazwisko2' size='20' name='nazwisko2'/></td>
									<td id=td2></td>
								</tr>
								<tr>
									<td>Address:</td>
									<td><input type='text' id='adres2' size='20' name='adres2'/></td>
									<td id=td3></td>
								</tr>
								<tr>
									<td>Postal code:</td>
									<td><input type='text' size='20' name='kod2' id=kod2 onKeyPress='TylkoKodPocztowy2(event)'/></td>
									<td id=td4></td>	
								</tr>
								<tr>
									<td>City:</td>
									<td><input type='text' size='20' id='miasto2' name='miasto2'/></td>
									<td id=td5></td>
								</tr>
								</table>
							</td>
						</tr>
						</table>
					<input type='hidden' id='imie' size='20' name='imie' value='<%out.println(request.getParameter("imie"));%>' />
					<input type='hidden' id='nazwisko' size='20' name='nazwisko' value='<%out.println(request.getParameter("nazwisko"));%>' />
					<input type='hidden' id='adres' size='20' name='adres' value='<%out.println(request.getParameter("adres"));%>' />
					<input type='hidden' id=kod name='kod' value='<%out.println(request.getParameter("kod"));%>' />
					<input type='hidden' id='miasto' name='miasto' value='<%out.println(request.getParameter("miasto"));%>'/>
					<input type='hidden' id='data' name='data' value='<%out.println(request.getParameter("data_kuriera"));%>'/>
					<input type='hidden' id='uwagi' name='uwagi' value='<%out.println(request.getParameter("uwagi"));%>'/>
					<input class=przycisk type='button' id='ok' name='ok' value='Continue' onClick='Zamowkuriera3()'>
					<input class=przycisk type='button' name='clean' value='Cancel' onClick='javascript:window.location = "index.jsp";'>
					<input class=przycisk type='button' name='clean' value='Back' onClick='history.back();'>	
					</form>
		<%}else{ %>
				<br><img src="images/stop.png" width=30% height=30%><br><br>
				<h1>ACCESS DANIED</h1><br>
				You don't have permission to access this page.<br>		
	<%}}else if(request.getParameter("pos")!=null && request.getParameter("pos").equals("3")){%>
				<h3>Ordering a courier: STAGE 4/4</h3><br>
				<img src='images/kurier.png' width=20% height=20%>
					<h3>Personal informations:</h3><br>
					<table class=opcje >
						<tr>
							<td align="center" valign="middle"> 
								<table cellspacing='5px'>
								<tr>
									<td>Name:</td>
									<td><%out.println(request.getParameter("imie"));%></td>
								</tr>
								<tr>
									<td>Surname:</td>
									<td><%out.println(request.getParameter("nazwisko"));%></td>
								</tr>
								<tr>
									<td>Address:</td>
									<td><%out.println(request.getParameter("adres"));%></td>
								</tr>
								<tr>
									<td>Postal code:</td>
									<td><%out.println(request.getParameter("kod"));%></td>
								</tr>
								<tr>
									<td>City:</td>
									<td><%out.println(request.getParameter("miasto"));%></td>
								</tr>
								<tr>
									<td>Date of arrival of a courier:</td>
									<td><%out.println(request.getParameter("data"));%></td>
								</tr>
								<tr>
									<td>Additional comments:</td>
									<td><%out.println(request.getParameter("uwagi"));%></td>
								</tr>
								</table>
							</td>
						</tr>
					</table>
					<h3>Recipient data:</h3><br>
					<table class=opcje >
						<tr>
							<td align="center" valign="middle"> 
								<table cellspacing='5px'>
								<tr>
									<td>Name:</td>
									<td><%out.println(request.getParameter("imie2"));%></td>
								</tr>
								<tr>
									<td>Surname:</td>
									<td><%out.println(request.getParameter("nazwisko2"));%></td>
								</tr>
								<tr>
									<td>Address:</td>
									<td><%out.println(request.getParameter("adres2"));%></td>
								</tr>
								<tr>
									<td>Postal code:</td>
									<td><%out.println(request.getParameter("kod2"));%></td>
								</tr>
								<tr>
									<td>City:</td>
									<td><%out.println(request.getParameter("miasto2"));%></td>
								</tr>
								</table>
							</td>
						</tr>
					</table>
					<form id=rejestracja name=rejestracja method=post onSubmit='Ustawienia()' action=#>
					<input type='hidden' id='imie' size='20' name='imie' value='<%out.println(request.getParameter("imie"));%>' />
					<input type='hidden' id='nazwisko' size='20' name='nazwisko' value='<%out.println(request.getParameter("nazwisko"));%>' />
					<input type='hidden' id='adres' size='20' name='adres' value='<%out.println(request.getParameter("adres"));%>' />
					<input type='hidden' id=kod name='kod' value='<%out.println(request.getParameter("kod"));%>' />
					<input type='hidden' id='miasto' name='miasto' value='<%out.println(request.getParameter("miasto"));%>'/>
					<input type='hidden' id='imie2' size='20' name='imie2' value='<%out.println(request.getParameter("imie2"));%>' />
					<input type='hidden' id='nazwisko2' size='20' name='nazwisko2' value='<%out.println(request.getParameter("nazwisko2"));%>' />
					<input type='hidden' id='adres2' size='20' name='adres2' value='<%out.println(request.getParameter("adres2"));%>' />
					<input type='hidden' id=kod2 name='kod2' value='<%out.println(request.getParameter("kod2"));%>' />
					<input type='hidden' id='miasto2' name='miasto2' value='<%out.println(request.getParameter("miasto2"));%>'/>
					<input type='hidden' id='data' name='data' value='<%out.println(request.getParameter("data"));%>'/>
					<input type='hidden' id='uwagi' name='uwagi' value='<%out.println(request.getParameter("uwagi"));%>'/>
					<input type='checkbox' id='check' name='check' value='akceptuje' onClick='odblokuj()'/>I accept the terms.<br/><br/>	
					<input class=przycisk type='button' id='ok' name='ok' value='Accept' onClick='Zamowkuriera4()' disabled>
					<input class=przycisk type='button' name='clean' value='Cancel' onClick='javascript:window.location = "index.jsp";'>
					<input class=przycisk type='button' name='clean' value='Back' onClick='history.back();'>	
					</form>
	<%}else{%>
	<h3>Ordering a courier: STAGE 1/4</h3><br>
		<img src='images/kurier.png' width=20% height=20%>
		<h3>Personal informations:</h3><br>
		<form id=rejestracja name=rejestracja method=post onSubmit='Ustawienia()' action=#>
		<table class=opcje >
		<tr>
			<td align="center" valign="middle"> 
				<table cellspacing='20px'>
				<tr>
					<td></td>				
					<td><input type="radio" name="data" value="current" onClick='blokuj1()' id='current' checked>Current</td>
					<td><input type="radio" name="data" value="new" onClick='blokuj2()'>Other</td>
				</tr>
				<tr>
					<td>Name:</td>
					<td><input type='text' id='imie' size='20' name='imie' value='<%out.println(imie);%>' readonly/></td>
					<td><input type='text' id='imie2' size='20' name='imie2' disabled/></td>
					<td id=td1></td>
				</tr>
				<tr>
					<td>Surname:</td>
					<td><input type='text' id='nazwisko' size='20' name='nazwisko' value='<%out.println(nazwisko);%>' readonly/></td>
					<td><input type='text' id='nazwisko2' size='20' name='nazwisko2' disabled/></td>
					<td id=td2></td>
				</tr>
				<tr>
					<td>Address:</td>
					<td><input type='text' id='adres' size='20' name='adres' value='<%out.println(adres);%>' readonly/></td>
					<td><input type='text' id='adres2' size='20' name='adres2' disabled/></td>
					<td id=td3></td>
				</tr>
				<tr>
					<td>Postal code:</td>
					<td><input type='text' size='20' name='kod' id=kod value='<%out.println(kod);%>' readonly/></td>
					<td><input type='text' size='20' name='kod2' id=kod2 onKeyPress='TylkoKodPocztowy2(event)' disabled/></td>
					<td id=td4></td>	
				</tr>
				<tr>
					<td>City:</td>
					<td><input type='text' size='20' id='miasto' name='miasto' value='<%out.println(miasto);%>'  readonly/></td>
					<td><input type='text' size='20' id='miasto2' name='miasto2' disabled/></td>
					<td id=td5></td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		<br/>
		<input class=przycisk type='button' id='ok' name='ok' value='Continue' onClick='Zamowkuriera1()'>
		<input class=przycisk type='button' name='clean' value='Cancel' onClick='javascript:window.location = "index.jsp";'>
		<input class=przycisk type='button' name='clean' value='Clean' onClick='wyczysc_order()'>
		<%}%>
	</form>
	</fieldset>
	</div>
	
	
	
	
	<%}else{%>			
	<%if(request.getParameter("pos")!=null && request.getParameter("pos").equals("1")){	
		if(request.getParameter("data")!=null){%>
			<%if(request.getParameter("data").equals("current")){%>
				<h3>Zamówienie kuriera: ETAP 2/4</h3><br>
				<img src='images/kurier.png' width=20% height=20%>
				<h3>Dane zamawiającego:</h3><br>
				<table class=opcje >
					<tr>
						<td align="center" valign="middle"> 
							<table cellspacing='5px'>
							<tr>
								<td>Imię:</td>
								<td><%out.println(request.getParameter("imie"));%></td>
							</tr>
							<tr>
								<td>Nazwisko:</td>
								<td><%out.println(request.getParameter("nazwisko"));%></td>
							</tr>
							<tr>
								<td>Adres:</td>
								<td><%out.println(request.getParameter("adres"));%></td>
							</tr>
							<tr>
								<td>Kod pocztowy:</td>
								<td><%out.println(request.getParameter("kod"));%></td>
							</tr>
							<tr>
								<td>Miasto:</td>
								<td><%out.println(request.getParameter("miasto"));%></td>
							</tr>
							</table>
						</td>
					</tr>
				</table>
				<br>
				<hr>
				<h3>Wybierz date przybycia kuriera:</h3>	
				          <div id="embeddedCalendar" style="margin-left: auto; margin-right: auto">
				          </div>
				          <br />
			<form id=rejestracja name=rejestracja method=post action=#>
			<table class=opcje >
				<tr>
					<td align="center" valign="middle"> 
						<table cellspacing='5px'>
							<tr>
								<td>Wybrana data:</td>
								<td><input type='text' id='data_kuriera' size='27' name='data_kuriera' value='Wybierz date' readonly/></td>
								<td id=td1></td>
							</tr>
							<tr>
								<td>Dodatkowe uwagi:</td>
								<td><textarea style="height:50px; width:25" name='uwagi' id='uwagi'></textarea></td>
								<td id=td2></td>
							</tr>								
						</table>
					</td>
				</tr>
			</table>				
					<input type='hidden' id='imie' size='20' name='imie' value='<%out.println(request.getParameter("imie"));%>' />
					<input type='hidden' id='nazwisko' size='20' name='nazwisko' value='<%out.println(request.getParameter("nazwisko"));%>' />
					<input type='hidden' id='adres' size='20' name='adres' value='<%out.println(request.getParameter("adres"));%>' />
					<input type='hidden' size='20' name='kod' id=kod value='<%out.println(request.getParameter("kod"));%>' />
					<input type='hidden' size='20' id='miasto' name='miasto' value='<%out.println(request.getParameter("miasto"));%>'/>
					<input class=przycisk type='button' id='ok' name='ok' value='Kontynuuj' onClick='Zamowkuriera2()'>
					<input class=przycisk type='button' name='clean' value='Anuluj' onClick='javascript:window.location = "index.jsp";'>
					<input class=przycisk type='button' name='clean' value='Wróć' onClick='history.back();'>
			</form>
			<%}else if(request.getParameter("data").equals("new")){%>
				<h3>Zamówienie kuriera: ETAP 2/4</h3><br>
				<img src='images/kurier.png' width=20% height=20%>
				<h3>Dane zamawiającego:</h3><br>
				<table class=opcje >
					<tr>
						<td align="center" valign="middle"> 
							<table cellspacing='5px'>
							<tr>
								<td>Imię:</td>
								<td><%out.println(request.getParameter("imie2"));%></td>
							</tr>
							<tr>
								<td>Nazwisko:</td>
								<td><%out.println(request.getParameter("nazwisko2"));%></td>
							</tr>
							<tr>
								<td>Adres:</td>
								<td><%out.println(request.getParameter("adres2"));%></td>
							</tr>
							<tr>
								<td>Kod pocztowy:</td>
								<td><%out.println(request.getParameter("kod2"));%></td>
							</tr>
							<tr>
								<td>Miasto:</td>
								<td><%out.println(request.getParameter("miasto2"));%></td>
							</tr>
							</table>
						</td>
					</tr>
				</table>
				<br>
				<hr>
				<h3>Wybierz date przybycia kuriera:</h3>	
				          <div id="embeddedCalendar" style="margin-left: auto; margin-right: auto">
				          </div>
				          <br />
			<form id=rejestracja name=rejestracja method=post action=#>
			<table class=opcje >
				<tr>
					<td align="center" valign="middle"> 
						<table cellspacing='5px'>
							<tr>
								<td>Wybrana data:</td>
								<td><input type='text' id='data_kuriera' size='27' name='data_kuriera' value='Wybierz date' readonly/></td>
								<td id=td1></td>
							</tr>
							<tr>
								<td>Dodatkowe uwagi:</td>
								<td><textarea style="height:50px; width:25" name='uwagi' id='uwagi'></textarea></td>
								<td id=td2></td>
							</tr>								
						</table>
					</td>
				</tr>
			</table>
					<input type='hidden' id='imie' size='20' name='imie' value='<%out.println(request.getParameter("imie2"));%>' />
					<input type='hidden' id='nazwisko' size='20' name='nazwisko' value='<%out.println(request.getParameter("nazwisko2"));%>' />
					<input type='hidden' id='adres' size='20' name='adres' value='<%out.println(request.getParameter("adres2"));%>' />
					<input type='hidden' size='20' name='kod' id=kod value='<%out.println(request.getParameter("kod2"));%>' />
					<input type='hidden' size='20' id='miasto' name='miasto' value='<%out.println(request.getParameter("miasto2"));%>'/>
					<input class=przycisk type='button' id='ok' name='ok' value='Kontynuuj' onClick='Zamowkuriera2()'>
					<input class=przycisk type='button' name='clean' value='Anuluj' onClick='javascript:window.location = "index.jsp";'>
					<input class=przycisk type='button' name='clean' value='Wróć' onClick='history.back();'>
			</form>
			<%}else{%>
				<br><img src="images/stop.png" width=30% height=30%><br><br>
				<h1>DOSTĘP ZABRONIONY</h1><br>
				Wystąpił błąd.<br>Nie masz uprawnień do oglądania tej strony.<br>
			<%} %>
		<%}else{%>	
				<br><img src="images/stop.png" width=30% height=30%><br><br>
				<h1>DOSTĘP ZABRONIONY</h1><br>
				Wystąpił błąd.<br>Nie masz uprawnień do oglądania tej strony.<br>			
	<%}}
	else if(request.getParameter("pos")!=null && request.getParameter("pos").equals("2")){		
		if(request.getParameter("data_kuriera")!=null){%>
			<h3>Zamówienie kuriera: ETAP 3/4</h3><br>
			<img src='images/kurier.png' width=20% height=20%>
					<h3>Dane osoby zamawiającej:</h3><br>
					<table class=opcje >
						<tr>
							<td align="center" valign="middle"> 
								<table cellspacing='5px'>
								<tr>
									<td>Imię:</td>
									<td><%out.println(request.getParameter("imie"));%></td>
								</tr>
								<tr>
									<td>Nazwisko:</td>
									<td><%out.println(request.getParameter("nazwisko"));%></td>
								</tr>
								<tr>
									<td>Adres:</td>
									<td><%out.println(request.getParameter("adres"));%></td>
								</tr>
								<tr>
									<td>Kod pocztowy:</td>
									<td><%out.println(request.getParameter("kod"));%></td>
								</tr>
								<tr>
									<td>Miasto:</td>
									<td><%out.println(request.getParameter("miasto"));%></td>
								</tr>
								<tr>
									<td>Data przybycia kuriera:</td>
									<td><%out.println(request.getParameter("data_kuriera"));%></td>
								</tr>
								<tr>
									<td>Uwagi dodatkowe:</td>
									<td><%out.println(request.getParameter("uwagi"));%></td>
								</tr>
								</table>
							</td>
						</tr>
					</table>	
					<br/>
					<hr>
					<h3>Dane odbiorcy przesyłki:</h3><br>
					<form id=rejestracja name=rejestracja method=post onSubmit='Ustawienia()' action=#>
						<table class=opcje >
						<tr>
							<td align="center" valign="middle"> 
								<table cellspacing='20px'>
								<tr>
									<td>Imię:</td>
									<td><input type='text' id='imie2' size='20' name='imie2'/></td>
										<td id=td1></td>
								</tr>
								<tr>
									<td>Nazwisko:</td>
									<td><input type='text' id='nazwisko2' size='20' name='nazwisko2'/></td>
									<td id=td2></td>
								</tr>
								<tr>
									<td>Adres:</td>
									<td><input type='text' id='adres2' size='20' name='adres2'/></td>
									<td id=td3></td>
								</tr>
								<tr>
									<td>Kod pocztowy:</td>
									<td><input type='text' size='20' name='kod2' id=kod2 onKeyPress='TylkoKodPocztowy2(event)'/></td>
									<td id=td4></td>	
								</tr>
								<tr>
									<td>Miasto:</td>
									<td><input type='text' size='20' id='miasto2' name='miasto2'/></td>
									<td id=td5></td>
								</tr>
								</table>
							</td>
						</tr>
						</table>
					<input type='hidden' id='imie' size='20' name='imie' value='<%out.println(request.getParameter("imie"));%>' />
					<input type='hidden' id='nazwisko' size='20' name='nazwisko' value='<%out.println(request.getParameter("nazwisko"));%>' />
					<input type='hidden' id='adres' size='20' name='adres' value='<%out.println(request.getParameter("adres"));%>' />
					<input type='hidden' id=kod name='kod' value='<%out.println(request.getParameter("kod"));%>' />
					<input type='hidden' id='miasto' name='miasto' value='<%out.println(request.getParameter("miasto"));%>'/>
					<input type='hidden' id='data' name='data' value='<%out.println(request.getParameter("data_kuriera"));%>'/>
					<input type='hidden' id='uwagi' name='uwagi' value='<%out.println(request.getParameter("uwagi"));%>'/>
					<input class=przycisk type='button' id='ok' name='ok' value='Kontynuuj' onClick='Zamowkuriera3()'>
					<input class=przycisk type='button' name='clean' value='Anuluj' onClick='javascript:window.location = "index.jsp";'>
					<input class=przycisk type='button' name='clean' value='Wróć' onClick='history.back();'>	
					</form>
		<%}else{ %>
				<br><img src="images/stop.png" width=30% height=30%><br><br>
				<h1>DOSTĘP ZABRONIONY</h1><br>
				Wystąpił błąd.<br>Nie masz uprawnień do oglądania tej strony.<br>				
	<%}}else if(request.getParameter("pos")!=null && request.getParameter("pos").equals("3")){%>
				<h3>Zamówienie kuriera: ETAP 4/4</h3><br>
				<img src='images/kurier.png' width=20% height=20%>
					<h3>Dane osoby zamawiającej:</h3><br>
					<table class=opcje >
						<tr>
							<td align="center" valign="middle"> 
								<table cellspacing='5px'>
								<tr>
									<td>Imię:</td>
									<td><%out.println(request.getParameter("imie"));%></td>
								</tr>
								<tr>
									<td>Nazwisko:</td>
									<td><%out.println(request.getParameter("nazwisko"));%></td>
								</tr>
								<tr>
									<td>Adres:</td>
									<td><%out.println(request.getParameter("adres"));%></td>
								</tr>
								<tr>
									<td>Kod pocztowy:</td>
									<td><%out.println(request.getParameter("kod"));%></td>
								</tr>
								<tr>
									<td>Miasto:</td>
									<td><%out.println(request.getParameter("miasto"));%></td>
								</tr>
								<tr>
									<td>Data przybycia kuriera:</td>
									<td><%out.println(request.getParameter("data"));%></td>
								</tr>
								<tr>
									<td>Uwagi dodatkowe:</td>
									<td><%out.println(request.getParameter("uwagi"));%></td>
								</tr>
								</table>
							</td>
						</tr>
					</table>
					<h3>Dane odbiorcy:</h3><br>
					<table class=opcje >
						<tr>
							<td align="center" valign="middle"> 
								<table cellspacing='5px'>
								<tr>
									<td>Imię:</td>
									<td><%out.println(request.getParameter("imie2"));%></td>
								</tr>
								<tr>
									<td>Nazwisko:</td>
									<td><%out.println(request.getParameter("nazwisko2"));%></td>
								</tr>
								<tr>
									<td>Adres:</td>
									<td><%out.println(request.getParameter("adres2"));%></td>
								</tr>
								<tr>
									<td>Kod pocztowy:</td>
									<td><%out.println(request.getParameter("kod2"));%></td>
								</tr>
								<tr>
									<td>Miasto:</td>
									<td><%out.println(request.getParameter("miasto2"));%></td>
								</tr>
								</table>
							</td>
						</tr>
					</table>
					<form id=rejestracja name=rejestracja method=post onSubmit='Ustawienia()' action=#>
					<input type='hidden' id='imie' size='20' name='imie' value='<%out.println(request.getParameter("imie"));%>' />
					<input type='hidden' id='nazwisko' size='20' name='nazwisko' value='<%out.println(request.getParameter("nazwisko"));%>' />
					<input type='hidden' id='adres' size='20' name='adres' value='<%out.println(request.getParameter("adres"));%>' />
					<input type='hidden' id=kod name='kod' value='<%out.println(request.getParameter("kod"));%>' />
					<input type='hidden' id='miasto' name='miasto' value='<%out.println(request.getParameter("miasto"));%>'/>
					<input type='hidden' id='imie2' size='20' name='imie2' value='<%out.println(request.getParameter("imie2"));%>' />
					<input type='hidden' id='nazwisko2' size='20' name='nazwisko2' value='<%out.println(request.getParameter("nazwisko2"));%>' />
					<input type='hidden' id='adres2' size='20' name='adres2' value='<%out.println(request.getParameter("adres2"));%>' />
					<input type='hidden' id=kod2 name='kod2' value='<%out.println(request.getParameter("kod2"));%>' />
					<input type='hidden' id='miasto2' name='miasto2' value='<%out.println(request.getParameter("miasto2"));%>'/>
					<input type='hidden' id='data' name='data' value='<%out.println(request.getParameter("data"));%>'/>
					<input type='hidden' id='uwagi' name='uwagi' value='<%out.println(request.getParameter("uwagi"));%>'/>
					<input type='checkbox' id='check' name='check' value='akceptuje' onClick='odblokuj()'/> Akceptuję regulamin<br/><br/>	
					<input class=przycisk type='button' id='ok' name='ok' value='Akceptuj' onClick='Zamowkuriera4()' disabled>
					<input class=przycisk type='button' name='clean' value='Anuluj' onClick='javascript:window.location = "index.jsp";'>
					<input class=przycisk type='button' name='clean' value='Wróć' onClick='history.back();'>	
					</form>
	<%}else{%>
	<h3>Zamówienie kuriera: ETAP 1/4</h3><br>
		<img src='images/kurier.png' width=20% height=20%>
		<h3>Dane zamawiającego:</h3><br>
		<form id=rejestracja name=rejestracja method=post onSubmit='Ustawienia()' action=#>
		<table class=opcje >
		<tr>
			<td align="center" valign="middle"> 
				<table cellspacing='20px'>
				<tr>
					<td></td>				
					<td><input type="radio" name="data" value="current" onClick='blokuj1()' id='current' checked>Mój adres</td>
					<td><input type="radio" name="data" value="new" onClick='blokuj2()'>Inny adres</td>
				</tr>
				<tr>
					<td>Imię:</td>
					<td><input type='text' id='imie' size='20' name='imie' value='<%out.println(imie);%>' readonly/></td>
					<td><input type='text' id='imie2' size='20' name='imie2' disabled/></td>
					<td id=td1></td>
				</tr>
				<tr>
					<td>Nazwisko:</td>
					<td><input type='text' id='nazwisko' size='20' name='nazwisko' value='<%out.println(nazwisko);%>' readonly/></td>
					<td><input type='text' id='nazwisko2' size='20' name='nazwisko2' disabled/></td>
					<td id=td2></td>
				</tr>
				<tr>
					<td>Adres:</td>
					<td><input type='text' id='adres' size='20' name='adres' value='<%out.println(adres);%>' readonly/></td>
					<td><input type='text' id='adres2' size='20' name='adres2' disabled/></td>
					<td id=td3></td>
				</tr>
				<tr>
					<td>Kod pocztowy:</td>
					<td><input type='text' size='20' name='kod' id=kod value='<%out.println(kod);%>' readonly/></td>
					<td><input type='text' size='20' name='kod2' id=kod2 onKeyPress='TylkoKodPocztowy2(event)' disabled/></td>
					<td id=td4></td>	
				</tr>
				<tr>
					<td>Miasto:</td>
					<td><input type='text' size='20' id='miasto' name='miasto' value='<%out.println(miasto);%>'  readonly/></td>
					<td><input type='text' size='20' id='miasto2' name='miasto2' disabled/></td>
					<td id=td5></td>
				</tr>
				</table>
			</td>
		</tr>
		</table>
		<br/>
		<input class=przycisk type='button' id='ok' name='ok' value='Kontynuuj' onClick='Zamowkuriera1()'>
		<input class=przycisk type='button' name='clean' value='Anuluj' onClick='javascript:window.location = "index.jsp";'>
		<input class=przycisk type='button' name='clean' value='Wyczyść' onClick='wyczysc_order()'>
		<%}%>
	</form>
	</fieldset>
	</div>
	<%
	}}else{
	if(sesja.getAttribute("lang").equals("en")){%>
		<br><img src="images/stop.png" width=30% height=30%><br><br>
		<h1>ACCESS DANIED</h1><br>
		You don't have permission to access this page.<br>
		<%if(!sesja.getAttribute("log").equals("klient")) %>Only registered users have permission to order a courier.<br/> Register and log in first.
		<br><br>	
	<%}else{ %>
		<br><img src="images/stop.png" width=30% height=30%><br><br>
		<h1>DOSTĘP ZABRONIONY</h1><br>
		Nie masz uprawnień do oglądania tej strony.<br>
		<%if(!sesja.getAttribute("log").equals("klient")) %>Tylko zarejestrowanie użytkownicy mają możliwość zamówienia kuriera.<br/>Zarejestruj i zaloguj się najpierw.
		<br><br>
<%}}%>
</div>
</body>
</html>